package com.chance.cc.crawler.prod.command.trigger.domain.vm.xcar.realtime;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.xcar.realtime.XcarSeriesConfigRealtimeCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @ClassName song
 * @Description TODO
 * @Author ding
 * @Date 2021/8/27 11:15
 * 爱卡车系配置采集
 * @Version 1.0
 **/
public class XcarSeriesConfigScheduleTrigger  extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {


       XcarSeriesConfigScheduleTriggerInfo();
       // XcarSeriesConfigScheduleTriggerInfoTest();
    }

    public static void XcarSeriesConfigScheduleTriggerInfoTest(){
        CrawlerJob crawlerJob = XcarSeriesConfigRealtimeCrawlerScheduleJob.xcarCwalerJob();
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                XcarSeriesConfigRealtimeCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "爱卡汽车车系页配置信息临时采集");
        System.out.println("添加采集调度： "+page.getRawText());
    }

    public static void XcarSeriesConfigScheduleTriggerInfo(){
        CrawlerJob crawlerJob = XcarSeriesConfigRealtimeCrawlerScheduleJob.xcarCwalerJob();
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                XcarSeriesConfigRealtimeCrawlerScheduleJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 4 1 * ? *",//TODO 定时采集时间未定
                "爱卡汽车车系页配置信息 每月1号 4点定时采集");
        System.out.println("添加采集调度： "+page.getRawText());
    }
}
